package com.nulldev.util.internal.android_compat.atomics;

import com.nulldev.util.internal.android_compat.atomics.impl.real.WrappedAtomicReference;
import com.nulldev.util.internal.android_compat.atomics.impl.stubs.FakeAtomicReference;
import com.nulldev.util.manage.nullUtil;

public class PsuedoAtomics {

	public static <T> IPsuedoAtomic<T> make(final T initialValue) {
		if (nullUtil.IS_ANDROID_BUILD) {
			return new FakeAtomicReference<T>(initialValue);
		} else {
			return new WrappedAtomicReference<T>(initialValue);
		}
	}

	public static IPsuedoAtomic<Long> make(final long initialValue) {
		if (nullUtil.IS_ANDROID_BUILD) {
			return new FakeAtomicReference<Long>(initialValue);
		} else {
			return new WrappedAtomicReference<Long>(initialValue);
		}
	}
}
